package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.CompanyApproSettingExample.E_APPRO_FLOW_ID;
import static org.jsola.hr.example.CompanyApproSettingExample.E_COMPANY_ID;
import static org.jsola.hr.example.CompanyApproSettingExample.E_IS_OPEN;
import static org.jsola.hr.example.CompanyApproSettingExample.M_APPRO_FLOW_ID_MAX;
import static org.jsola.hr.example.CompanyApproSettingExample.M_APPRO_FLOW_ID_NOT_NULL;
import static org.jsola.hr.example.CompanyApproSettingExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.CompanyApproSettingExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.CompanyApproSettingExample.N_APPRO_FLOW_ID;
import static org.jsola.hr.example.CompanyApproSettingExample.N_COMPANY_ID;
import static org.jsola.hr.example.CompanyApproSettingExample.N_IS_OPEN;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【公司审批开启设置】的参数")
@Data
public class CompanyApproSettingAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;

    @ApiModelProperty(notes = N_APPRO_FLOW_ID, example = E_APPRO_FLOW_ID, required = true)
    @NotNull(message = M_APPRO_FLOW_ID_NOT_NULL)
    @Length(max = 32, message = M_APPRO_FLOW_ID_MAX)
    private String approFlowId;

    @ApiModelProperty(notes = N_IS_OPEN, example = E_IS_OPEN)
    private Boolean isOpen;


}

